<?php 
defined( '_JEXEC' ) or die( 'Restricted access' );
jimport( 'joomla.application.component.view' );
JTable::addIncludePath(JPATH_COMPONENT.DS.'tables');
class HotrosViewHotro extends JView
{
	function display($tpl = null)
	{	
		$db		=& JFactory::getDBO();
		$uri	=& JFactory::getURI();
		$hotro		=& $this->get('Data');
		$isNew		= ($hotro->hotro_id < 1);
		$text = $isNew ? JText::_( 'New' ) : JText::_( 'Chỉnh sửa' );
		JToolBarHelper::title(   JText::_( 'Hỗ trợ ' ).': <small><small>[ ' . $text.' ]</small></small>' );
		JToolBarHelper::save();
		if ($isNew)  {
			JToolBarHelper::cancel();
		} else {
			JToolBarHelper::cancel( 'Hủy', 'Cancel' );
		}
		$this->assignRef('hotro',		$hotro);
		$row =& JTable::getInstance('Hotro', 'Table');
		$lists = array();		
		/*$support = array(
				  '0' => array('value' => 'business','text' => 'Business'),
				  '1' => array('value' => 'technical','text' => 'Technical')
				  );
		$lists['support'] = JHTML::_('select.genericList',$support, 'support', 'class="inputbox" '. '', 'value','text');*/
		$detail	=& $this->get('data');	
		//$lists['support'] 		= JHTML::_('select.booleanlist',  'support', 'class="inputbox"', $hotro->support );
		$lists['published'] 		= JHTML::_('select.booleanlist',  'published', 'class="inputbox"', $hotro->published );
		$items		= & $this->get( 'Data');
		$model = & $this->getModel();
		$this->assignRef('lists',		$lists);
		$this->assignRef('items',		$items);
		$this->assignRef('pagination',	$pagination);
		parent::display($tpl);
	}
}